/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * JInternalFrameCatalogue.java
 *
 * Created on Dec 3, 2011, 12:39:55 PM
 */
package callcenter;

import Database.Catalogue;
import Database.Catalogue_Vender;
import Database.Vender;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.Vector;
import javax.print.DocFlavor.STRING;
import javax.swing.DefaultComboBoxModel;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;
import Util.Check;
import javax.swing.JOptionPane;
/**
 *
 * @author user
 */
public class JInternalFrameCatalogue extends javax.swing.JInternalFrame {
    Vector<Vender> vdr  = new Vector<Vender>();
    Vector<Catalogue> ctl=new Vector<Catalogue>();
    private String langue = new String();
    private String country = new String();
    private String str = new String();
    private Locale lc = null;
    private ResourceBundle rb = null;
    private int lg;
    private int count =1;

    /** Creates new form JInternalFrameCatalogue */
    public JInternalFrameCatalogue() {
        initComponents();
       ShowCatalog(1);
        jButtonPre.setEnabled(false);
        Medium.jifc = this;
        lg = Medium.jf1.KQ();

        if (lg == 0) {

        createcombo();
        if (lg == 0) {

            Translate("en", "English", "JInternalFrameCatalogue_en_US");
        } else {
            Translate("vi", "Vietnamese", "JInternalFrameCatalogue_vi_VN");
        }
        Catalogue.CatalogPT(1);
    }
    }    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
//    public void Callthetranslation(int lg) {
//    }


    
    public void createcombo()
    {
        Vender vd=new Vender();
        vdr=vd.getvender();
        DefaultComboBoxModel dc=new DefaultComboBoxModel();
        for(Vender v:vdr)
        {
            dc.addElement(v.getVenderName());
            jComboBoxVenderName.setModel(dc);
        }
    }
    
    public void ShowCatalog(int n)
    {
        Vector<Object> cols = new  Vector<Object>();
        cols.add("Catalog Name");
        cols.add("Vender Name");
        DefaultTableModel dtm = new DefaultTableModel(Catalogue.CatalogPT(n), cols)
        {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableListCatalog.getTableHeader().setReorderingAllowed(false);
        this.jTableListCatalog.setModel(dtm);
        
    }
    
    public void GetInfomationCat()
    {
        String cat = this.jTableListCatalog.getValueAt(jTableListCatalog.getSelectedRow(), 0).toString();
        Catalogue ctl = new Catalogue();
        ctl = Catalogue.infomationCat(cat);
        this.jTextFieldCatalogName.setText(ctl.getCatalogueName());
        this.jComboBoxVenderName.setSelectedIndex(jTableListCatalog.getSelectedRow());
    }
       private void Translate(String landue, String tenqg, String chuoi) 
   {
        //callcenter/resources/JInternalFramePrchaseBill1_en_US
        lc = new Locale(landue, tenqg);
        rb = ResourceBundle.getBundle("callcenter/resources/" + chuoi, lc);
        jTabbedPane1.setTitleAt(0, rb.getString("tab1"));
        jTabbedPane1.setTitleAt(1, rb.getString("tab2"));
        TitledBorder t = (TitledBorder) this.jPanel3.getBorder();
        t.setTitle(rb.getString("jPanel3.border.title"));
        jLabel1.setText(rb.getString("jLabel1.text"));
        jLabel2.setText(rb.getString("jLabel2.text"));
        jLabel3.setText(rb.getString("jLabel3.text"));
        jLabel4.setText(rb.getString("jLabel4.text"));
        TitledBorder t1 = (TitledBorder) this.jPanel4.getBorder();
        t1.setTitle(rb.getString("jPanel4.border.title"));
        jButtonAdd.setText(rb.getString("jButtonAdd.text"));
        jButtonDelete.setText(rb.getString("jButtonDelete.text"));
        jButtonEdit.setText(rb.getString("jButtonEdit.text"));
        jButtonEnt.setText(rb.getString("jButtonEnt.text"));
        jButtonEnter.setText(rb.getString("jButtonEnter.text"));
        jButtonNest.setText(rb.getString("jButtonNest.text"));
        jButtonNext.setText(rb.getString("jButtonNext.text"));
        jButtonPre.setText(rb.getString("jButtonPre.text"));
        jButtonPrevious.setText(rb.getString("jButtonPrevious.text"));
        jButtonRefresh.setText(rb.getString("jButtonRefresh.text"));
        jButtonSearch.setText(rb.getString("jButtonSearch.text"));
        TitledBorder t25 = (TitledBorder) this.jPanel25.getBorder();
        t25.setTitle(rb.getString("jPanel25.border.title"));


    }
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButton4 = new javax.swing.JButton();
        jButton6 = new javax.swing.JButton();
        jPanel11 = new javax.swing.JPanel();
        jPanel20 = new javax.swing.JPanel();
        jPanel45 = new javax.swing.JPanel();
        jPanel49 = new javax.swing.JPanel();
        jPanel67 = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        jPanel12 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jPanel14 = new javax.swing.JPanel();
        jPanel15 = new javax.swing.JPanel();
        jPanel16 = new javax.swing.JPanel();
        jPanel17 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jPanel18 = new javax.swing.JPanel();
        jTextFieldCatalogName = new javax.swing.JTextField();
        jPanel19 = new javax.swing.JPanel();
        jComboBoxVenderName = new javax.swing.JComboBox();
        jPanel22 = new javax.swing.JPanel();
        jPanel21 = new javax.swing.JPanel();
        jButtonAdd = new javax.swing.JButton();
        jPanel46 = new javax.swing.JPanel();
        jPanel47 = new javax.swing.JPanel();
        jButtonEdit = new javax.swing.JButton();
        jPanel48 = new javax.swing.JPanel();
        jPanel50 = new javax.swing.JPanel();
        jButtonDelete = new javax.swing.JButton();
        jPanel57 = new javax.swing.JPanel();
        jButtonRefresh = new javax.swing.JButton();
        jPanel23 = new javax.swing.JPanel();
        jPanel44 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jPanel58 = new javax.swing.JPanel();
        jPanel60 = new javax.swing.JPanel();
        jPanel69 = new javax.swing.JPanel();
        jLabelValues = new javax.swing.JLabel();
        jPanel61 = new javax.swing.JPanel();
        jPanel62 = new javax.swing.JPanel();
        jPanel63 = new javax.swing.JPanel();
        jButtonPre = new javax.swing.JButton();
        jPanel64 = new javax.swing.JPanel();
        jPanel65 = new javax.swing.JPanel();
        jButtonNest = new javax.swing.JButton();
        jPanel66 = new javax.swing.JPanel();
        jPanel68 = new javax.swing.JPanel();
        jTextField3 = new javax.swing.JTextField();
        jPanel70 = new javax.swing.JPanel();
        jButtonEnt = new javax.swing.JButton();
        jPanel59 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTableListCatalog = new javax.swing.JTable();
        jPanel2 = new javax.swing.JPanel();
        jPanel24 = new javax.swing.JPanel();
        jPanel26 = new javax.swing.JPanel();
        jPanel27 = new javax.swing.JPanel();
        jPanel28 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jPanel29 = new javax.swing.JPanel();
        jPanel30 = new javax.swing.JPanel();
        jPanel31 = new javax.swing.JPanel();
        jPanel32 = new javax.swing.JPanel();
        jPanel33 = new javax.swing.JPanel();
        jPanel35 = new javax.swing.JPanel();
        jPanel36 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jPanel37 = new javax.swing.JPanel();
        jPanel38 = new javax.swing.JPanel();
        jPanel39 = new javax.swing.JPanel();
        jPanel40 = new javax.swing.JPanel();
        jPanel34 = new javax.swing.JPanel();
        jPanel41 = new javax.swing.JPanel();
        jPanel42 = new javax.swing.JPanel();
        jTextFieldSearch = new javax.swing.JTextField();
        jPanel43 = new javax.swing.JPanel();
        jPanel54 = new javax.swing.JPanel();
        jPanel55 = new javax.swing.JPanel();
        jPanel56 = new javax.swing.JPanel();
        jButtonSearch = new javax.swing.JButton();
        jPanel51 = new javax.swing.JPanel();
        jPanel52 = new javax.swing.JPanel();
        jPanel53 = new javax.swing.JPanel();
        jPanel25 = new javax.swing.JPanel();
        jPanel71 = new javax.swing.JPanel();
        jPanel73 = new javax.swing.JPanel();
        jPanel82 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jPanel74 = new javax.swing.JPanel();
        jPanel75 = new javax.swing.JPanel();
        jPanel77 = new javax.swing.JPanel();
        jPanel78 = new javax.swing.JPanel();
        jButtonPrevious = new javax.swing.JButton();
        jPanel79 = new javax.swing.JPanel();
        jPanel80 = new javax.swing.JPanel();
        jButtonNext = new javax.swing.JButton();
        jPanel76 = new javax.swing.JPanel();
        jButtonEnter = new javax.swing.JButton();
        jPanel81 = new javax.swing.JPanel();
        jTextField4 = new javax.swing.JTextField();
        jPanel72 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTableSCatalog = new javax.swing.JTable();

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(callcenter.CallcenterApp.class).getContext().getResourceMap(JInternalFrameCatalogue.class);
        jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
        jButton4.setName("jButton4"); // NOI18N

        jButton6.setText(resourceMap.getString("jButton6.text")); // NOI18N
        jButton6.setName("jButton6"); // NOI18N

        jPanel11.setName("jPanel11"); // NOI18N

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPanel20.setName("jPanel20"); // NOI18N

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPanel45.setName("jPanel45"); // NOI18N

        javax.swing.GroupLayout jPanel45Layout = new javax.swing.GroupLayout(jPanel45);
        jPanel45.setLayout(jPanel45Layout);
        jPanel45Layout.setHorizontalGroup(
            jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel45Layout.setVerticalGroup(
            jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPanel49.setName("jPanel49"); // NOI18N

        javax.swing.GroupLayout jPanel49Layout = new javax.swing.GroupLayout(jPanel49);
        jPanel49.setLayout(jPanel49Layout);
        jPanel49Layout.setHorizontalGroup(
            jPanel49Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel49Layout.setVerticalGroup(
            jPanel49Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jPanel67.setName("jPanel67"); // NOI18N

        javax.swing.GroupLayout jPanel67Layout = new javax.swing.GroupLayout(jPanel67);
        jPanel67.setLayout(jPanel67Layout);
        jPanel67Layout.setHorizontalGroup(
            jPanel67Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel67Layout.setVerticalGroup(
            jPanel67Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        setClosable(true);
        setIconifiable(true);
        setMaximizable(true);
        setName("Form"); // NOI18N
        setPreferredSize(new java.awt.Dimension(970, 520));

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N
        jPanel1.setLayout(new java.awt.GridLayout(2, 1, 2, 2));

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel3.border.title"))); // NOI18N
        jPanel3.setName("jPanel3"); // NOI18N
        jPanel3.setLayout(new java.awt.BorderLayout());

        jPanel5.setName("jPanel5"); // NOI18N
        jPanel5.setPreferredSize(new java.awt.Dimension(250, 162));

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 250, Short.MAX_VALUE)
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 178, Short.MAX_VALUE)
        );

        jPanel3.add(jPanel5, java.awt.BorderLayout.LINE_START);

        jPanel6.setName("jPanel6"); // NOI18N
        jPanel6.setPreferredSize(new java.awt.Dimension(250, 162));

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 250, Short.MAX_VALUE)
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 178, Short.MAX_VALUE)
        );

        jPanel3.add(jPanel6, java.awt.BorderLayout.LINE_END);

        jPanel7.setName("jPanel7"); // NOI18N
        jPanel7.setLayout(new java.awt.BorderLayout());

        jPanel8.setName("jPanel8"); // NOI18N
        jPanel8.setLayout(new java.awt.GridLayout(1, 0));

        jPanel10.setName("jPanel10"); // NOI18N
        jPanel10.setLayout(new java.awt.GridLayout(6, 1, 4, 4));

        jPanel12.setName("jPanel12"); // NOI18N
        jPanel12.setLayout(new java.awt.BorderLayout());

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N
        jPanel12.add(jLabel1, java.awt.BorderLayout.CENTER);

        jPanel10.add(jPanel12);

        jPanel13.setName("jPanel13"); // NOI18N
        jPanel13.setLayout(new java.awt.BorderLayout());

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N
        jPanel13.add(jLabel2, java.awt.BorderLayout.CENTER);

        jPanel10.add(jPanel13);

        jPanel14.setName("jPanel14"); // NOI18N

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel10.add(jPanel14);

        jPanel15.setName("jPanel15"); // NOI18N

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel10.add(jPanel15);

        jPanel16.setName("jPanel16"); // NOI18N

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel10.add(jPanel16);

        jPanel17.setName("jPanel17"); // NOI18N

        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
        jPanel17.setLayout(jPanel17Layout);
        jPanel17Layout.setHorizontalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel17Layout.setVerticalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel10.add(jPanel17);

        jPanel8.add(jPanel10);

        jPanel7.add(jPanel8, java.awt.BorderLayout.LINE_START);

        jPanel9.setName("jPanel9"); // NOI18N
        jPanel9.setLayout(new java.awt.GridLayout(6, 1, 4, 4));

        jPanel18.setName("jPanel18"); // NOI18N
        jPanel18.setLayout(new java.awt.BorderLayout());

        jTextFieldCatalogName.setText(resourceMap.getString("jTextFieldCatalogName.text")); // NOI18N
        jTextFieldCatalogName.setName("jTextFieldCatalogName"); // NOI18N
        jPanel18.add(jTextFieldCatalogName, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel18);

        jPanel19.setName("jPanel19"); // NOI18N
        jPanel19.setLayout(new java.awt.BorderLayout());

        jComboBoxVenderName.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jComboBoxVenderName.setName("jComboBoxVenderName"); // NOI18N
        jComboBoxVenderName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxVenderNameActionPerformed(evt);
            }
        });
        jPanel19.add(jComboBoxVenderName, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel19);

        jPanel22.setName("jPanel22"); // NOI18N
        jPanel22.setLayout(new java.awt.BorderLayout());

        jPanel21.setName("jPanel21"); // NOI18N
        jPanel21.setPreferredSize(new java.awt.Dimension(73, 26));
        jPanel21.setLayout(new java.awt.BorderLayout());

        jButtonAdd.setText(resourceMap.getString("jButtonAdd.text")); // NOI18N
        jButtonAdd.setName("jButtonAdd"); // NOI18N
        jButtonAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAddActionPerformed(evt);
            }
        });
        jPanel21.add(jButtonAdd, java.awt.BorderLayout.CENTER);

        jPanel22.add(jPanel21, java.awt.BorderLayout.LINE_START);

        jPanel46.setName("jPanel46"); // NOI18N
        jPanel46.setLayout(new java.awt.BorderLayout());

        jPanel47.setName("jPanel47"); // NOI18N
        jPanel47.setPreferredSize(new java.awt.Dimension(72, 26));
        jPanel47.setLayout(new java.awt.BorderLayout());

        jButtonEdit.setText(resourceMap.getString("jButtonEdit.text")); // NOI18N
        jButtonEdit.setName("jButtonEdit"); // NOI18N
        jButtonEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonEditActionPerformed(evt);
            }
        });
        jPanel47.add(jButtonEdit, java.awt.BorderLayout.CENTER);

        jPanel46.add(jPanel47, java.awt.BorderLayout.LINE_START);

        jPanel48.setName("jPanel48"); // NOI18N
        jPanel48.setLayout(new java.awt.BorderLayout());

        jPanel50.setName("jPanel50"); // NOI18N
        jPanel50.setPreferredSize(new java.awt.Dimension(72, 26));
        jPanel50.setLayout(new java.awt.BorderLayout());

        jButtonDelete.setText(resourceMap.getString("jButtonDelete.text")); // NOI18N
        jButtonDelete.setName("jButtonDelete"); // NOI18N
        jButtonDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDeleteActionPerformed(evt);
            }
        });
        jPanel50.add(jButtonDelete, java.awt.BorderLayout.CENTER);

        jPanel48.add(jPanel50, java.awt.BorderLayout.LINE_START);

        jPanel57.setName("jPanel57"); // NOI18N
        jPanel57.setLayout(new java.awt.BorderLayout());

        jButtonRefresh.setText(resourceMap.getString("jButtonRefresh.text")); // NOI18N
        jButtonRefresh.setName("jButtonRefresh"); // NOI18N
        jButtonRefresh.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonRefreshActionPerformed(evt);
            }
        });
        jPanel57.add(jButtonRefresh, java.awt.BorderLayout.CENTER);

        jPanel48.add(jPanel57, java.awt.BorderLayout.CENTER);

        jPanel46.add(jPanel48, java.awt.BorderLayout.CENTER);

        jPanel22.add(jPanel46, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel22);

        jPanel23.setName("jPanel23"); // NOI18N

        javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);
        jPanel23.setLayout(jPanel23Layout);
        jPanel23Layout.setHorizontalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 291, Short.MAX_VALUE)
        );
        jPanel23Layout.setVerticalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel9.add(jPanel23);

        jPanel44.setName("jPanel44"); // NOI18N

        javax.swing.GroupLayout jPanel44Layout = new javax.swing.GroupLayout(jPanel44);
        jPanel44.setLayout(jPanel44Layout);
        jPanel44Layout.setHorizontalGroup(
            jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 291, Short.MAX_VALUE)
        );
        jPanel44Layout.setVerticalGroup(
            jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel9.add(jPanel44);

        jPanel7.add(jPanel9, java.awt.BorderLayout.CENTER);

        jPanel3.add(jPanel7, java.awt.BorderLayout.CENTER);

        jPanel1.add(jPanel3);

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("jPanel4.border.border.lineColor"), 3), resourceMap.getString("jPanel4.border.title"))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N
        jPanel4.setLayout(new java.awt.BorderLayout());

        jPanel58.setName("jPanel58"); // NOI18N
        jPanel58.setPreferredSize(new java.awt.Dimension(889, 30));
        jPanel58.setLayout(new java.awt.BorderLayout());

        jPanel60.setName("jPanel60"); // NOI18N
        jPanel60.setPreferredSize(new java.awt.Dimension(300, 30));
        jPanel60.setLayout(new java.awt.BorderLayout());

        jPanel69.setName("jPanel69"); // NOI18N
        jPanel69.setPreferredSize(new java.awt.Dimension(50, 30));
        jPanel69.setLayout(new java.awt.BorderLayout());

        jLabelValues.setFont(resourceMap.getFont("jLabelValues.font")); // NOI18N
        jLabelValues.setForeground(resourceMap.getColor("jLabelValues.foreground")); // NOI18N
        jLabelValues.setText(resourceMap.getString("jLabelValues.text")); // NOI18N
        jLabelValues.setName("jLabelValues"); // NOI18N
        jPanel69.add(jLabelValues, java.awt.BorderLayout.CENTER);

        jPanel60.add(jPanel69, java.awt.BorderLayout.LINE_END);

        jPanel58.add(jPanel60, java.awt.BorderLayout.LINE_END);

        jPanel61.setName("jPanel61"); // NOI18N
        jPanel61.setPreferredSize(new java.awt.Dimension(300, 30));

        javax.swing.GroupLayout jPanel61Layout = new javax.swing.GroupLayout(jPanel61);
        jPanel61.setLayout(jPanel61Layout);
        jPanel61Layout.setHorizontalGroup(
            jPanel61Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
        jPanel61Layout.setVerticalGroup(
            jPanel61Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel58.add(jPanel61, java.awt.BorderLayout.LINE_START);

        jPanel62.setName("jPanel62"); // NOI18N
        jPanel62.setPreferredSize(new java.awt.Dimension(285, 30));
        jPanel62.setLayout(new java.awt.BorderLayout());

        jPanel63.setName("jPanel63"); // NOI18N
        jPanel63.setPreferredSize(new java.awt.Dimension(72, 30));
        jPanel63.setLayout(new java.awt.BorderLayout());

        jButtonPre.setText(resourceMap.getString("jButtonPre.text")); // NOI18N
        jButtonPre.setName("jButtonPre"); // NOI18N
        jButtonPre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonPreActionPerformed(evt);
            }
        });
        jPanel63.add(jButtonPre, java.awt.BorderLayout.CENTER);

        jPanel62.add(jPanel63, java.awt.BorderLayout.LINE_START);

        jPanel64.setName("jPanel64"); // NOI18N
        jPanel64.setLayout(new java.awt.BorderLayout());

        jPanel65.setName("jPanel65"); // NOI18N
        jPanel65.setPreferredSize(new java.awt.Dimension(73, 30));
        jPanel65.setLayout(new java.awt.BorderLayout());

        jButtonNest.setText(resourceMap.getString("jButtonNest.text")); // NOI18N
        jButtonNest.setName("jButtonNest"); // NOI18N
        jButtonNest.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonNestActionPerformed(evt);
            }
        });
        jPanel65.add(jButtonNest, java.awt.BorderLayout.CENTER);

        jPanel64.add(jPanel65, java.awt.BorderLayout.LINE_START);

        jPanel66.setName("jPanel66"); // NOI18N
        jPanel66.setLayout(new java.awt.BorderLayout());

        jPanel68.setName("jPanel68"); // NOI18N
        jPanel68.setPreferredSize(new java.awt.Dimension(75, 30));
        jPanel68.setLayout(new java.awt.BorderLayout());

        jTextField3.setText(resourceMap.getString("jTextField3.text")); // NOI18N
        jTextField3.setName("jTextField3"); // NOI18N
        jPanel68.add(jTextField3, java.awt.BorderLayout.CENTER);

        jPanel66.add(jPanel68, java.awt.BorderLayout.LINE_START);

        jPanel70.setName("jPanel70"); // NOI18N
        jPanel70.setPreferredSize(new java.awt.Dimension(70, 30));
        jPanel70.setLayout(new java.awt.BorderLayout());

        jButtonEnt.setText(resourceMap.getString("jButtonEnt.text")); // NOI18N
        jButtonEnt.setName("jButtonEnt"); // NOI18N
        jButtonEnt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonEntActionPerformed(evt);
            }
        });
        jPanel70.add(jButtonEnt, java.awt.BorderLayout.CENTER);

        jPanel66.add(jPanel70, java.awt.BorderLayout.CENTER);

        jPanel64.add(jPanel66, java.awt.BorderLayout.CENTER);

        jPanel62.add(jPanel64, java.awt.BorderLayout.CENTER);

        jPanel58.add(jPanel62, java.awt.BorderLayout.CENTER);

        jPanel4.add(jPanel58, java.awt.BorderLayout.PAGE_END);

        jPanel59.setName("jPanel59"); // NOI18N
        jPanel59.setLayout(new java.awt.BorderLayout());

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jTableListCatalog.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        jTableListCatalog.setName("jTableListCatalog"); // NOI18N
        jTableListCatalog.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTableListCatalogMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(jTableListCatalog);

        jPanel59.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        jPanel4.add(jPanel59, java.awt.BorderLayout.CENTER);

        jPanel1.add(jPanel4);

        jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N
        jPanel2.setLayout(new java.awt.GridLayout(2, 1, 3, 3));

        jPanel24.setBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("jPanel24.border.lineColor"), 3)); // NOI18N
        jPanel24.setName("jPanel24"); // NOI18N
        jPanel24.setLayout(new java.awt.BorderLayout());

        jPanel26.setName("jPanel26"); // NOI18N
        jPanel26.setPreferredSize(new java.awt.Dimension(200, 182));

        javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);
        jPanel26.setLayout(jPanel26Layout);
        jPanel26Layout.setHorizontalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 200, Short.MAX_VALUE)
        );
        jPanel26Layout.setVerticalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 198, Short.MAX_VALUE)
        );

        jPanel24.add(jPanel26, java.awt.BorderLayout.LINE_START);

        jPanel27.setName("jPanel27"); // NOI18N
        jPanel27.setPreferredSize(new java.awt.Dimension(200, 182));

        javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27);
        jPanel27.setLayout(jPanel27Layout);
        jPanel27Layout.setHorizontalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 200, Short.MAX_VALUE)
        );
        jPanel27Layout.setVerticalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 198, Short.MAX_VALUE)
        );

        jPanel24.add(jPanel27, java.awt.BorderLayout.LINE_END);

        jPanel28.setName("jPanel28"); // NOI18N
        jPanel28.setLayout(new java.awt.BorderLayout());

        jLabel3.setFont(resourceMap.getFont("jLabel3.font")); // NOI18N
        jLabel3.setForeground(resourceMap.getColor("jLabel3.foreground")); // NOI18N
        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N
        jPanel28.add(jLabel3, java.awt.BorderLayout.PAGE_START);

        jPanel29.setName("jPanel29"); // NOI18N
        jPanel29.setLayout(new java.awt.BorderLayout());

        jPanel30.setName("jPanel30"); // NOI18N

        javax.swing.GroupLayout jPanel30Layout = new javax.swing.GroupLayout(jPanel30);
        jPanel30.setLayout(jPanel30Layout);
        jPanel30Layout.setHorizontalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel30Layout.setVerticalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 181, Short.MAX_VALUE)
        );

        jPanel29.add(jPanel30, java.awt.BorderLayout.LINE_START);

        jPanel31.setName("jPanel31"); // NOI18N

        javax.swing.GroupLayout jPanel31Layout = new javax.swing.GroupLayout(jPanel31);
        jPanel31.setLayout(jPanel31Layout);
        jPanel31Layout.setHorizontalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel31Layout.setVerticalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 181, Short.MAX_VALUE)
        );

        jPanel29.add(jPanel31, java.awt.BorderLayout.LINE_END);

        jPanel32.setName("jPanel32"); // NOI18N
        jPanel32.setLayout(new java.awt.BorderLayout());

        jPanel33.setName("jPanel33"); // NOI18N
        jPanel33.setLayout(new java.awt.GridLayout(6, 1, 4, 4));

        jPanel35.setName("jPanel35"); // NOI18N

        javax.swing.GroupLayout jPanel35Layout = new javax.swing.GroupLayout(jPanel35);
        jPanel35.setLayout(jPanel35Layout);
        jPanel35Layout.setHorizontalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel35Layout.setVerticalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel33.add(jPanel35);

        jPanel36.setName("jPanel36"); // NOI18N
        jPanel36.setLayout(new java.awt.BorderLayout());

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N
        jPanel36.add(jLabel4, java.awt.BorderLayout.CENTER);

        jPanel33.add(jPanel36);

        jPanel37.setName("jPanel37"); // NOI18N

        javax.swing.GroupLayout jPanel37Layout = new javax.swing.GroupLayout(jPanel37);
        jPanel37.setLayout(jPanel37Layout);
        jPanel37Layout.setHorizontalGroup(
            jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel37Layout.setVerticalGroup(
            jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel33.add(jPanel37);

        jPanel38.setName("jPanel38"); // NOI18N

        javax.swing.GroupLayout jPanel38Layout = new javax.swing.GroupLayout(jPanel38);
        jPanel38.setLayout(jPanel38Layout);
        jPanel38Layout.setHorizontalGroup(
            jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel38Layout.setVerticalGroup(
            jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel33.add(jPanel38);

        jPanel39.setName("jPanel39"); // NOI18N

        javax.swing.GroupLayout jPanel39Layout = new javax.swing.GroupLayout(jPanel39);
        jPanel39.setLayout(jPanel39Layout);
        jPanel39Layout.setHorizontalGroup(
            jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel39Layout.setVerticalGroup(
            jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel33.add(jPanel39);

        jPanel40.setName("jPanel40"); // NOI18N

        javax.swing.GroupLayout jPanel40Layout = new javax.swing.GroupLayout(jPanel40);
        jPanel40.setLayout(jPanel40Layout);
        jPanel40Layout.setHorizontalGroup(
            jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel40Layout.setVerticalGroup(
            jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel33.add(jPanel40);

        jPanel32.add(jPanel33, java.awt.BorderLayout.LINE_START);

        jPanel34.setName("jPanel34"); // NOI18N
        jPanel34.setLayout(new java.awt.GridLayout(6, 1, 4, 4));

        jPanel41.setName("jPanel41"); // NOI18N

        javax.swing.GroupLayout jPanel41Layout = new javax.swing.GroupLayout(jPanel41);
        jPanel41.setLayout(jPanel41Layout);
        jPanel41Layout.setHorizontalGroup(
            jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 197, Short.MAX_VALUE)
        );
        jPanel41Layout.setVerticalGroup(
            jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel34.add(jPanel41);

        jPanel42.setName("jPanel42"); // NOI18N
        jPanel42.setLayout(new java.awt.BorderLayout());

        jTextFieldSearch.setText(resourceMap.getString("jTextFieldSearch.text")); // NOI18N
        jTextFieldSearch.setName("jTextFieldSearch"); // NOI18N
        jPanel42.add(jTextFieldSearch, java.awt.BorderLayout.CENTER);

        jPanel34.add(jPanel42);

        jPanel43.setName("jPanel43"); // NOI18N
        jPanel43.setLayout(new java.awt.BorderLayout());

        jPanel54.setName("jPanel54"); // NOI18N
        jPanel54.setPreferredSize(new java.awt.Dimension(70, 26));

        javax.swing.GroupLayout jPanel54Layout = new javax.swing.GroupLayout(jPanel54);
        jPanel54.setLayout(jPanel54Layout);
        jPanel54Layout.setHorizontalGroup(
            jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 70, Short.MAX_VALUE)
        );
        jPanel54Layout.setVerticalGroup(
            jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel43.add(jPanel54, java.awt.BorderLayout.LINE_START);

        jPanel55.setName("jPanel55"); // NOI18N
        jPanel55.setPreferredSize(new java.awt.Dimension(70, 26));

        javax.swing.GroupLayout jPanel55Layout = new javax.swing.GroupLayout(jPanel55);
        jPanel55.setLayout(jPanel55Layout);
        jPanel55Layout.setHorizontalGroup(
            jPanel55Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 70, Short.MAX_VALUE)
        );
        jPanel55Layout.setVerticalGroup(
            jPanel55Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel43.add(jPanel55, java.awt.BorderLayout.LINE_END);

        jPanel56.setName("jPanel56"); // NOI18N
        jPanel56.setLayout(new java.awt.BorderLayout());

        jButtonSearch.setText(resourceMap.getString("jButtonSearch.text")); // NOI18N
        jButtonSearch.setName("jButtonSearch"); // NOI18N
        jButtonSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSearchActionPerformed(evt);
            }
        });
        jPanel56.add(jButtonSearch, java.awt.BorderLayout.CENTER);

        jPanel43.add(jPanel56, java.awt.BorderLayout.CENTER);

        jPanel34.add(jPanel43);

        jPanel51.setName("jPanel51"); // NOI18N

        javax.swing.GroupLayout jPanel51Layout = new javax.swing.GroupLayout(jPanel51);
        jPanel51.setLayout(jPanel51Layout);
        jPanel51Layout.setHorizontalGroup(
            jPanel51Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 197, Short.MAX_VALUE)
        );
        jPanel51Layout.setVerticalGroup(
            jPanel51Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel34.add(jPanel51);

        jPanel52.setName("jPanel52"); // NOI18N

        javax.swing.GroupLayout jPanel52Layout = new javax.swing.GroupLayout(jPanel52);
        jPanel52.setLayout(jPanel52Layout);
        jPanel52Layout.setHorizontalGroup(
            jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 197, Short.MAX_VALUE)
        );
        jPanel52Layout.setVerticalGroup(
            jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel34.add(jPanel52);

        jPanel53.setName("jPanel53"); // NOI18N

        javax.swing.GroupLayout jPanel53Layout = new javax.swing.GroupLayout(jPanel53);
        jPanel53.setLayout(jPanel53Layout);
        jPanel53Layout.setHorizontalGroup(
            jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 197, Short.MAX_VALUE)
        );
        jPanel53Layout.setVerticalGroup(
            jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 26, Short.MAX_VALUE)
        );

        jPanel34.add(jPanel53);

        jPanel32.add(jPanel34, java.awt.BorderLayout.CENTER);

        jPanel29.add(jPanel32, java.awt.BorderLayout.CENTER);

        jPanel28.add(jPanel29, java.awt.BorderLayout.CENTER);

        jPanel24.add(jPanel28, java.awt.BorderLayout.CENTER);

        jPanel2.add(jPanel24);

        jPanel25.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("jPanel25.border.border.lineColor"), 3), resourceMap.getString("jPanel25.border.title"))); // NOI18N
        jPanel25.setName("jPanel25"); // NOI18N
        jPanel25.setLayout(new java.awt.BorderLayout());

        jPanel71.setName("jPanel71"); // NOI18N
        jPanel71.setPreferredSize(new java.awt.Dimension(889, 30));
        jPanel71.setLayout(new java.awt.BorderLayout());

        jPanel73.setName("jPanel73"); // NOI18N
        jPanel73.setPreferredSize(new java.awt.Dimension(300, 30));
        jPanel73.setLayout(new java.awt.BorderLayout());

        jPanel82.setName("jPanel82"); // NOI18N
        jPanel82.setPreferredSize(new java.awt.Dimension(50, 30));
        jPanel82.setLayout(new java.awt.BorderLayout());

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N
        jPanel82.add(jLabel6, java.awt.BorderLayout.CENTER);

        jPanel73.add(jPanel82, java.awt.BorderLayout.LINE_END);

        jPanel71.add(jPanel73, java.awt.BorderLayout.LINE_END);

        jPanel74.setName("jPanel74"); // NOI18N
        jPanel74.setPreferredSize(new java.awt.Dimension(300, 30));

        javax.swing.GroupLayout jPanel74Layout = new javax.swing.GroupLayout(jPanel74);
        jPanel74.setLayout(jPanel74Layout);
        jPanel74Layout.setHorizontalGroup(
            jPanel74Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
        jPanel74Layout.setVerticalGroup(
            jPanel74Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel71.add(jPanel74, java.awt.BorderLayout.LINE_START);

        jPanel75.setName("jPanel75"); // NOI18N
        jPanel75.setLayout(new java.awt.BorderLayout());

        jPanel77.setName("jPanel77"); // NOI18N
        jPanel77.setLayout(new java.awt.BorderLayout());

        jPanel78.setName("jPanel78"); // NOI18N
        jPanel78.setPreferredSize(new java.awt.Dimension(72, 30));
        jPanel78.setLayout(new java.awt.BorderLayout());

        jButtonPrevious.setText(resourceMap.getString("jButtonPrevious.text")); // NOI18N
        jButtonPrevious.setName("jButtonPrevious"); // NOI18N
        jButtonPrevious.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                //jButtonPreviousActionPerformed(evt);
            }
        });
        jPanel78.add(jButtonPrevious, java.awt.BorderLayout.CENTER);

        jPanel77.add(jPanel78, java.awt.BorderLayout.LINE_START);

        jPanel79.setName("jPanel79"); // NOI18N
        jPanel79.setLayout(new java.awt.BorderLayout());

        jPanel80.setName("jPanel80"); // NOI18N
        jPanel80.setPreferredSize(new java.awt.Dimension(73, 30));
        jPanel80.setLayout(new java.awt.BorderLayout());

        jButtonNext.setText(resourceMap.getString("jButtonNext.text")); // NOI18N
        jButtonNext.setName("jButtonNext"); // NOI18N
        jPanel80.add(jButtonNext, java.awt.BorderLayout.CENTER);

        jPanel79.add(jPanel80, java.awt.BorderLayout.LINE_START);

        jPanel76.setName("jPanel76"); // NOI18N
        jPanel76.setPreferredSize(new java.awt.Dimension(72, 30));
        jPanel76.setLayout(new java.awt.BorderLayout());

        jButtonEnter.setText(resourceMap.getString("jButtonEnter.text")); // NOI18N
        jButtonEnter.setName("jButtonEnter"); // NOI18N
        jPanel76.add(jButtonEnter, java.awt.BorderLayout.CENTER);

        jPanel79.add(jPanel76, java.awt.BorderLayout.LINE_END);

        jPanel81.setName("jPanel81"); // NOI18N
        jPanel81.setLayout(new java.awt.BorderLayout());

        jTextField4.setText(resourceMap.getString("jTextField4.text")); // NOI18N
        jTextField4.setName("jTextField4"); // NOI18N
        jPanel81.add(jTextField4, java.awt.BorderLayout.CENTER);

        jPanel79.add(jPanel81, java.awt.BorderLayout.CENTER);

        jPanel77.add(jPanel79, java.awt.BorderLayout.CENTER);

        jPanel75.add(jPanel77, java.awt.BorderLayout.CENTER);

        jPanel71.add(jPanel75, java.awt.BorderLayout.CENTER);

        jPanel25.add(jPanel71, java.awt.BorderLayout.PAGE_END);

        jPanel72.setName("jPanel72"); // NOI18N
        jPanel72.setLayout(new java.awt.BorderLayout());

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jTableSCatalog.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        jTableSCatalog.setName("jTableSCatalog"); // NOI18N
        jScrollPane2.setViewportView(jTableSCatalog);

        jPanel72.add(jScrollPane2, java.awt.BorderLayout.CENTER);

        jPanel25.add(jPanel72, java.awt.BorderLayout.CENTER);

        jPanel2.add(jPanel25);

        jTabbedPane1.addTab(resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

        getContentPane().add(jTabbedPane1, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextField1ActionPerformed

    private void jTableListCatalogMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableListCatalogMouseClicked
        GetInfomationCat();
    }//GEN-LAST:event_jTableListCatalogMouseClicked
    public void addcatalong()
    {
        Catalogue cl = new Catalogue();
        cl.setCatalogueName(this.jTextFieldCatalogName.getText());
        Vender vd = new Vender();
        vd.setVenderName(jComboBoxVenderName.getSelectedItem().toString());
        cl.AddCatalog();
        ShowCatalog(1);
    }
    public void addcatalongvnder()
    {
        try
        {
        Vender v=new Vender();
        vdr=v.getvender();
        
        Catalogue_Vender cv=new Catalogue_Vender();
        cv.setCatalogueId( Catalogue.getidcatalog().getCatalogueId());
        cv.setVenderId(vdr.get(jComboBoxVenderName.getSelectedIndex()).getVenderId());
        if(cv.AddCV())
        {
            JOptionPane.showMessageDialog(null, "Them Thanh Cong");
        }
        else
             JOptionPane.showMessageDialog(null, "Them That Bai");
        }
        catch(Exception ex)
        {
            System.out.println(ex);
        }
    }
    
    public void EditCTL()
    {
        Catalogue ctl = new Catalogue();
        ctl.setCatalogueName(jTextFieldCatalogName.getText());
        ctl.EditCatalog();
        ShowCatalog(1);
    }
    
    public void Editcatalogvnder()
    {
        try 
        {
            Vender v = new Vender();
            vdr=v.getvender();
            
            
            Catalogue ctl = new Catalogue();
            ctl.setCatalogueName(this.jTextFieldCatalogName.getText());
            Catalogue_Vender cv = new Catalogue_Vender();
            cv.setVenderId(vdr.get(jComboBoxVenderName.getSelectedIndex()).getVenderId());
            if(cv.EditCV())
            {
                JOptionPane.showMessageDialog(null, "Sua thanh cong");
                ShowCatalog(1);
            }
            else
            {
                JOptionPane.showMessageDialog(null, "That bai");
            }
            
            
            
        }
        catch (Exception e) 
        {
            System.out.println(e);
        }
    }
    
    public void DelCTL()
    {
        
    }
    
    private void jButtonAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddActionPerformed
        addcatalong();
        addcatalongvnder(); 
    }//GEN-LAST:event_jButtonAddActionPerformed

 
    
    private void jButtonRefreshActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRefreshActionPerformed
       jTextFieldCatalogName.setText("");
       jComboBoxVenderName.setSelectedItem(0);
    }//GEN-LAST:event_jButtonRefreshActionPerformed

    private void jButtonSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSearchActionPerformed
        Dien(jTextFieldSearch.getText());
    }//GEN-LAST:event_jButtonSearchActionPerformed


    private void jButtonPreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonPreActionPerformed
        //jButtonPrevious.setText("Previous");
        count--;
        jLabelValues.setText(String.valueOf(count));
        jLabelValues.setText(String.valueOf(count));
        jButtonNest.setEnabled(true);
        ShowCatalog(count);
       System.out.println(count);
       if(count==1)
           jButtonPre.setEnabled(false);
        
    }//GEN-LAST:event_jButtonPreActionPerformed

    private void jButtonNestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNestActionPerformed
        // TODO add your handling code here:
        jButtonPre.setEnabled(true);
        count++;
        jLabelValues.setText(String.valueOf(count));
        ShowCatalog(count);
        if((count*5)+(Catalogue.Count()%5)>Catalogue.Count())
        {
            jButtonNest.setEnabled(false);
        }
        
    }//GEN-LAST:event_jButtonNestActionPerformed

    private void jButtonEntActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonEntActionPerformed
        // TODO add your handling code here:
        ShowCatalog(Integer.valueOf(jTextField3.getText()));
    }//GEN-LAST:event_jButtonEntActionPerformed

    private void jComboBoxVenderNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxVenderNameActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jComboBoxVenderNameActionPerformed

    private void jButtonEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonEditActionPerformed
        // TODO add your handling code here:
        //EditCTL();
        Editcatalogvnder();
    }//GEN-LAST:event_jButtonEditActionPerformed

    public  void DeleteCtl()
    {
        int dcl = jTableListCatalog.getSelectedRow();
        Catalogue ctl = new Catalogue();
        if(ctl.DelCatalog(dcl))
        {
            JOptionPane.showMessageDialog(null, "Xoa Thanh cong");
            ShowCatalog(1);
        }
        else
        {
            JOptionPane.showMessageDialog(null, "Xoa that bai");
        }
        
    }
    
    private void jButtonDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDeleteActionPerformed
        // TODO add your handling code here:
        DeleteCtl();
        int op = JOptionPane.showConfirmDialog(null, "Ban co muon Xoa?", "Canh Bao", JOptionPane.OK_CANCEL_OPTION);
        if (op == JOptionPane.OK_OPTION) 
        {
            int catalogid = jTableListCatalog.getSelectedRow();
            Catalogue ctl = new Catalogue();
            if (ctl.DelCatalog(catalogid))
            {
                JOptionPane.showMessageDialog(null, "Xoa Thanh Cong");
                ShowCatalog(1);
            }
        }
        else
        {
            JOptionPane.showMessageDialog(null, "Xoa that bai");
        }
    }//GEN-LAST:event_jButtonDeleteActionPerformed

    private void Dien(String a)
    {
        Vector<Object> ctl = new Vector<Object>();
        ctl.add("CatalogName");
        ctl.add("VenderName");
        DefaultTableModel dtm = new DefaultTableModel(Catalogue.ListCatalog2(a), ctl)
        {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
            
        };
        jTableSCatalog.setModel(dtm);
    }
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButtonAdd;
    private javax.swing.JButton jButtonDelete;
    private javax.swing.JButton jButtonEdit;
    private javax.swing.JButton jButtonEnt;
    private javax.swing.JButton jButtonEnter;
    private javax.swing.JButton jButtonNest;
    private javax.swing.JButton jButtonNext;
    private javax.swing.JButton jButtonPre;
    private javax.swing.JButton jButtonPrevious;
    private javax.swing.JButton jButtonRefresh;
    private javax.swing.JButton jButtonSearch;
    private javax.swing.JComboBox jComboBoxVenderName;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabelValues;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel39;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel40;
    private javax.swing.JPanel jPanel41;
    private javax.swing.JPanel jPanel42;
    private javax.swing.JPanel jPanel43;
    private javax.swing.JPanel jPanel44;
    private javax.swing.JPanel jPanel45;
    private javax.swing.JPanel jPanel46;
    private javax.swing.JPanel jPanel47;
    private javax.swing.JPanel jPanel48;
    private javax.swing.JPanel jPanel49;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel50;
    private javax.swing.JPanel jPanel51;
    private javax.swing.JPanel jPanel52;
    private javax.swing.JPanel jPanel53;
    private javax.swing.JPanel jPanel54;
    private javax.swing.JPanel jPanel55;
    private javax.swing.JPanel jPanel56;
    private javax.swing.JPanel jPanel57;
    private javax.swing.JPanel jPanel58;
    private javax.swing.JPanel jPanel59;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel60;
    private javax.swing.JPanel jPanel61;
    private javax.swing.JPanel jPanel62;
    private javax.swing.JPanel jPanel63;
    private javax.swing.JPanel jPanel64;
    private javax.swing.JPanel jPanel65;
    private javax.swing.JPanel jPanel66;
    private javax.swing.JPanel jPanel67;
    private javax.swing.JPanel jPanel68;
    private javax.swing.JPanel jPanel69;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel70;
    private javax.swing.JPanel jPanel71;
    private javax.swing.JPanel jPanel72;
    private javax.swing.JPanel jPanel73;
    private javax.swing.JPanel jPanel74;
    private javax.swing.JPanel jPanel75;
    private javax.swing.JPanel jPanel76;
    private javax.swing.JPanel jPanel77;
    private javax.swing.JPanel jPanel78;
    private javax.swing.JPanel jPanel79;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel80;
    private javax.swing.JPanel jPanel81;
    private javax.swing.JPanel jPanel82;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable jTableListCatalog;
    private javax.swing.JTable jTableSCatalog;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTextField jTextFieldCatalogName;
    private javax.swing.JTextField jTextFieldSearch;
    // End of variables declaration//GEN-END:variables
}
